import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue')
  },
  {
    path: '/',
    component: () => import('../LayoutView.vue'),
    name: 'layout',
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('../views/HomeView.vue')
      },
      {
        path: 'user',
        name: 'user',
        component: () => import('../views/UserView.vue')
      },
      {
        path: 'banner',
        name: 'banner',
        component: () => import('../views/BannerView.vue')
      },
      {
        path: 'work_life',
        name: 'work_life',
        component: () => import('../views/categorys/WorkLife.vue')
      },
      {
        path: 'skill_learn',
        name: 'skill_learn',
        component: () => import('../views/categorys/SkillLearning.vue')
      },
      {
        path: 'my_hobby',
        name: 'my_hobby',
        component: () => import('../views/categorys/MyHobby.vue')
      },
      {
        path: 'publish_article',
        name: 'publish_article',
        component: () => import('../views/articles/PublishArticle.vue')
      },
      {
        path: 'article_list',
        name: 'article_list',
        component: () => import('../views/articles/ArticleList.vue')
      },
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
